package com.punai.customer.mapper;

import com.punai.common.core.mapper.CommonMapper;
import com.punai.customer.domain.CusMaterialCuChapter;
import com.punai.customer.domain.CusMechanicalStaChapter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 机械章节Mapper接口
 *
 * @author zxw_
 * @date 2023-02-02
 */
public interface CusMechanicalStaChapterMapper extends CommonMapper<CusMechanicalStaChapter>
{
    /**
     * 查询机械章节
     *
     * @param id 机械章节主键
     * @return 机械章节
     */
    public CusMechanicalStaChapter selectCusMechanicalStaChapterById(String id);

    /**
     * 查询机械章节列表
     *
     * @param cusMechanicalStaChapter 机械章节
     * @return 机械章节集合
     */
    public List<CusMechanicalStaChapter> selectCusMechanicalStaChapterList(CusMechanicalStaChapter cusMechanicalStaChapter);


    /**
     * 删除机械章节
     *
     * @param id 机械章节主键
     * @return 结果
     */
    public int deleteCusMechanicalStaChapterById(String id);

    /**
     * 批量删除机械章节
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCusMechanicalStaChapterByIds(String[] ids);

    void copyCusMechanicalChapter(@Param("companyId") Long companyId);

    void copyCusMechanicalItem(@Param("companyId") Long companyId);

    void copyLinkMechanicalCusItemSta(@Param("companyId") Long companyId);

    List<CusMaterialCuChapter> selectChildId(@Param("chapterId") String chapterId, @Param("companyId") Long companyId);
    List<String> selectChildIdById(@Param("chapterId") String chapterId, @Param("companyId") Long companyId);

    void deleteByCompanyId(@Param("companyId") Long companyId);
}
